import { ActionDesc, PagesKey } from '@/global/constant'
import { IContentConfig, TableItemType } from '@/components/page-content/type'

const customRuleContent: IContentConfig = {
  pageKey: PagesKey.SensitiveReplace,
  tableConfig: {
    // bordered: true
    size: 'small',
    scroll: {
      // x: 1980
    }
  },
  isShowRowSelection: true,
  isShowMoreAction: true,
  moreActions: [
    { key: ActionDesc.Edit, label: '编辑' },
    { key: ActionDesc.Delete, label: '删除' }
  ],
  isShowAddBtn: true,
  isShowBatchBtn: true,
  batchActions: [{ key: ActionDesc.BatchDelete, label: '批量删除' }],
  tableItems: [
    {
      type: TableItemType.Column,
      title: '敏感词',
      dataIndex: 'targetName'
    },
    {
      type: TableItemType.Column,
      title: '替换词',
      dataIndex: 'replaceName'
    },
    {
      type: TableItemType.Column,
      title: '状态',
      dataIndex: 'isOpen',
      customkey: 'isOpen'
    },
    {
      type: TableItemType.Column,
      title: '创建时间',
      dataIndex: 'createTime',
      width: 160
    },
    {
      type: TableItemType.Column,
      title: '创建人',
      dataIndex: 'createBy'
    },
    {
      type: TableItemType.Column,
      title: '更新时间',
      dataIndex: 'updateTime',
      width: 160
    },
    {
      type: TableItemType.Column,
      title: '更新人',
      dataIndex: 'updateBy'
    }
  ]
}

export default customRuleContent
